Echo cancellation plays a fundamental role in modem telephony. The quality of telephone communications and the performance of the modern networks depend to a large extent upon the ability of the equipment to avoid or cancel echoes.
There are two kinds of echoes which may arise in the telephony: electrical echoes and acoustical echoes. The electrical echoes are due to impedance mismatch at the devices called hybrids where two-wire lines become four-wire lines. Hybrids are traditionally used when the two-wire local subscriber loop becomes a four-wire long distance trunk. The hybrid is also used at the point where the four wires (two wires from the microphone, and two wires from the speaker) are converted into the two-wire local loop.
The acoustic echo arises in a case when there is an acoustic path between the loudspeaker and the microphone so that part of the signal reproduced by the loudspeaker is reflected (weakened, delayed and distorted) by the room and then recorded by the microphone which is the typical situation when using a speakerphone.
Adaptive filters are used to cancel, or at least, significantly weaken the echoes for improving the quality and performance of telephone connections. Assuming that the input signal x (called reference signal) enters the echo generation system (hybrid or room); it generates an echo signal y which is mixed with the signal s which comes from the other side of the connection. The purpose of the adaptive filter is to subtract echo signal y from the output signal y+s (called primary signal). The signal remaining after the echo subtraction is the signal s plus an error r which is to be minimized. The adaptive filter bases its estimation of echo cancellation quality on the signal which results after the subtraction of the estimated echo from the echo generation system output. But in case of double-talk situation and even in a case of perfect echo cancellation, the output signal will not be equal to zero. Since the adaptive filter itself has no means to distinguish between the error r and the signal s, it will try to cancel the signal s leading to a wrong estimation of the echo path with following distortion of the signal of interest. To avoid this problem, a special block called double-talk detector is generally used. The purpose of this block is to detect the presence of the signal s and to give the adaptive filter a signal inhibiting its adaptation. In practice, some amount of the signal s is always present due to the environmental noise thus making a reliable double-talk detector very difficult to implement. Besides, if the echo path is changing during the double-talk, the system will not be able to track these changes making the results of echo cancellation totally irrelevant.
Various algorithms of adaptive filtering can be used in the echo cancellation system. The algorithm using Normalized Least Mean Squares (NLMS) is the most widely used for echo canceling application. This algorithm is very simple and easy to implement on a digital signal processor, but it suffers from the double-talk situation described above.